#! /bin/bash

for filename in $(git diff --cached --name-only | grep '.*\.[c|h]$'); do
  clang-format -style=file -i $filename; git add $filename;
done

